import request from '@/utils/request'


export default {

    //
    additive(data) {
        console.log("mounted7....") 
        return request({
        url: '/user/question/Addquestions',
        method: 'put',
        data
        })
  },
  pageList(page, limit) {
    return request({
        url: `/user/question/${page}/${limit}`,
        method: `post`,
    })
},
 //根据id删除
 removeById(id) {
    return request({
        url: `/user/question/deleteId/${id}`,
        method: `delete`
    })
},
Batchdeleter(idList) {
    return request({
        url: `/user/question/Batch_delete`,
        method: `delete`,
        data: idList
    })
},

//根据id查询该题
getbyid(id) {
    return request({
        url: `/user/question/getbyid/${id}`,
        method: `get`
        
    })
},

//根据id修改该题
updateid(data,id) {
    return request({
        url: `/user/question/update/${id}`,
        method: `put`,
        data
        
    })
},

//随机生成题目
getsubject(email) {
    return request({
        url: `/user/question/getsubject/${email}`,
        method: `get`     
    })
},

}